/**
 * Copyright (c) 2002-2011 旭鸣信息
 * All rights reserved. 
 * File：FunNodeDaoImpl.java
 * History:
 *       2012-1-13: Initially created, tangkf.
 */
package com.xteam.purview.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.xteam.db.IBaseDao;
import com.xteam.purview.entities.SysCodeInfo;
import com.xteam.purview.service.AbsFace;

/**
 * @author tangkf  ---2012-1-13
 */
public class SystemCodeFace extends AbsFace<SysCodeInfo> {
	
	private SystemCodeFace(){};
	
	private static SystemCodeFace	instance	= new SystemCodeFace();
	
	public static SystemCodeFace getInstance(){
		return instance;
	}
	
	public List<SysCodeInfo> getChildrenByPid(String pid){
		 List<SysCodeInfo> list	= new ArrayList<SysCodeInfo>();
		 String hql	= IBaseDao.SQL_FROM + SysCodeInfo.REF + IBaseDao.SQL_WHERE + SysCodeInfo.PROP_PID + "=?";
		 try {
			list	= dao.queryAll(hql, new Object[]{pid});
		} catch (Exception e) {
			e.printStackTrace();
		}
		 return list;
	}
}
